package cn.lucky.vo;

import cn.lucky.constant.ScopeType;
import cn.lucky.core.BeanDefinition;

public class SimpleBeanDefinition implements BeanDefinition {

    private boolean lazy;

    private Class<?> beanClass;
    private ScopeType scope;

    public SimpleBeanDefinition(){
        this.lazy=false;
        this.beanClass=null;
        this.scope=ScopeType.SINGLETON;
    }
    public SimpleBeanDefinition(Class<?> clazz, ScopeType scope, boolean lazy) {
        this.beanClass=clazz;
        this.scope=scope;
        this.lazy=lazy;
    }

    @Override
    public Class<?> getBeanClass() {
        return beanClass;
    }

    @Override
    public void setBeanClass(Class<?> beanClass) {
        this.beanClass=beanClass;
    }

    @Override
    public ScopeType getScope() {
        return scope;
    }

    @Override
    public void setScope(ScopeType scope) {
        this.scope=scope;
    }

    @Override
    public boolean isLazy() {
        return lazy;
    }

    @Override
    public void setLazy(boolean lazy) {
        this.lazy=lazy;
    }
}
